# !/bin/bash

# display files under a given directory.
# $1-the name of the directory.
# $2 the name of the files.

dir=$1;shift 1
if [ -d $dir ];then
	cd $dir
	for name
	do
		if [ -f $name ];then
			cat $name
			echo "End of ${dir}/$name."
		else echo "Invalid file name:${dir}/$name."
		fi
	done
else echo "Bad directory name:$dir."
fi